Remove mergenupkg: split Myriad and Myriad.Sdk into separate NuGet packages#189
Remove mergenupkg: split Myriad and Myriad.Sdk into separate NuGet packages#189
Conversation
…arate packages - Remove dotnet-mergenupkg from .config/dotnet-tools.json (broken in .NET 9 due to expired signature certificates) - Remove the dotnet mergenupkg step from build.proj - Update Myriad.Sdk.proj: remove SuppressDependenciesWhenPacking, remove Paket.Restore.targets import (project has no Paket deps), add PackageReference to Myriad so it becomes a proper NuGet dependency - Update src/Myriad.Sdk/build/Myriad.Sdk.props: replace embedded DLL path with dynamic path via $(NuGetPackageRoot) and version extracted from the package directory path using $(MSBuildThisFileFullPath) - Update .github/workflows/publish.yml: change windows-latest to ubuntu-latest Co-authored-by: 7sharp9 <588746+7sharp9@users.noreply.github.com>
7sharp9
left a comment
There was a problem hiding this comment.
what are the risks with this PR?
|
@copilot what are the risks or change in behavior because of this fix, does anything need to be added to the docs or README.md? |
- Update package versions in README examples from 0.5.0 to 0.8.4 - Add note that Myriad.Sdk automatically pulls in Myriad as a transitive dependency - Add CHANGELOG entries for mergenupkg removal and split-package change Co-authored-by: 7sharp9 <588746+7sharp9@users.noreply.github.com>
The main risks are:
Behavior changes:
Documentation updated in commit
|
There was a problem hiding this comment.
Pull request overview
This PR removes the dotnet-mergenupkg-based packaging flow and instead publishes Myriad (CLI tool) and Myriad.Sdk (MSBuild integration) as separate NuGet packages, updating build/CI/docs to match.
Changes:
- Removes
dotnet-mergenupkgfrom local tools and deletes the merge step frombuild.proj. - Updates
Myriad.Sdkto depend onMyriadand updatesMyriad.Sdk.propsto locateMyriad.dllvia$(NuGetPackageRoot)using the SDK package version. - Updates publish workflow runner OS and refreshes README/CHANGELOG documentation for the new packaging model.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Myriad.Sdk/build/Myriad.Sdk.props |
Derives Myriad.Sdk version from install path and uses it to locate Myriad.dll in the myriad tool package under the global packages folder. |
src/Myriad.Sdk/Myriad.Sdk.proj |
Removes packing suppression and adds PackageReference to Myriad so it becomes a transitive dependency. |
build.proj |
Removes mergenupkg step; still packs Myriad.Sdk and the solution. |
README.md |
Updates example versions and documents that Myriad.Sdk pulls in the Myriad CLI transitively. |
CHANGELOG.md |
Notes removal of dotnet-mergenupkg, package split, and CI runner change under 0.8.4. |
.github/workflows/publish.yml |
Switches CI runner from windows-latest to ubuntu-latest. |
.config/dotnet-tools.json |
Removes dotnet-mergenupkg tool from the repo tool manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <!-- pack sdk then whole sln --> | ||
| <Exec Command='dotnet pack src/Myriad.Sdk/Myriad.Sdk.proj -c Release -o "$(NupkgsDir)" /p:Version=$(Version)' /> | ||
| <Exec Command='dotnet pack src/Myriad.sln -c Release -o "$(NupkgsDir)" /p:Version=$(Version)' /> | ||
| <Exec Command='dotnet mergenupkg --source "$(NupkgsDir)/Myriad.Sdk.$(Version).nupkg" --other "$(NupkgsDir)/Myriad.$(Version).nupkg" --tools --only-files' /> | ||
| <Exec Command='dotnet pack src/Myriad.sln -c Release -o "$(NupkgsDir)" /p:Version=$(Version)' /> |
There was a problem hiding this comment.
Myriad.Sdk.proj now has a PackageReference to Myriad, but the Pack target packs Myriad.Sdk before packing the solution that produces Myriad.$(Version).nupkg. For a new version/tag (or any local pack where that version isn't already on NuGet), dotnet pack src/Myriad.Sdk/Myriad.Sdk.proj will fail restore because Myriad at $(Version) isn't available yet. Consider either packing Myriad first and adding $(NupkgsDir) as a restore source when packing Myriad.Sdk, or switching to a project-reference-based approach so the dependency can be resolved without requiring a pre-published package.
| <Description>MSBuild integration between Myriad and .NET Sdk projects</Description> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Myriad" Version="$(Version)" /> |
There was a problem hiding this comment.
Adding a PackageReference to Myriad means dotnet pack of Myriad.Sdk.proj must be able to restore Myriad at $(Version) from configured NuGet sources. When cutting a new release (or packing locally before publishing), that version of Myriad typically doesn't exist yet, so the pack/restore will fail unless the build sets up a local source (e.g. $(NupkgsDir)) or uses a project-reference-based approach.
| <PackageReference Include="Myriad" Version="$(Version)" /> | |
| <ProjectReference Include="..\Myriad\Myriad.fsproj" /> |
dotnet-mergenupkgfrom.config/dotnet-tools.jsondotnet mergenupkgstep frombuild.projMyriad.Sdk.proj: removeSuppressDependenciesWhenPacking, remove Paket import, addPackageReferencetoMyriadsrc/Myriad.Sdk/build/Myriad.Sdk.props: locateMyriad.dllvia$(NuGetPackageRoot)using version extracted from$(MSBuildThisFileFullPath)with override condition.github/workflows/publish.yml:windows-latest→ubuntu-latestMyriad.Sdkpulls inMyriadautomaticallyOriginal prompt
mergenupkgbreaks build pipeline in .NET 9; ci still using .NET 6 #183✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.